WebGL HOTSHOT by 2014

WebGL HOTSHOT by 2014

Author:2014
Language: eng
Format: mobi, epub
Publisher: Packt Publishing


Objective complete – mini debriefing

Facebook is becoming a great survey and data mining resource. With over 1 billion users, Facebook can provide instant demographic information by programming the Facebook API. That was certainly a bit of work just to post a single image of ourselves in WebGL. However, it is an important start, a proof-of-concept, to open the door for more applications to come.

Classified intel

We noted that the majority of Facebook images will likely not be in dimensions of two, and thus, we will not be able to access the features of mipmapping. To change the dimensions of an image so that it is a power of two requires an image-editing tool such as Adobe Photoshop. We can write our own program to perform this conversion, but this requires a high-level programming language such as Java or C++. JavaScript is too slow for the job. Resizing the image would also add a lengthy task before our WebGL Facebook application runs.

However, there is another way to use a graphics card for this image processing. Currently, we are writing shader programs running on the graphics card to perform pixel-by-pixel calculations for lighting and texture maps. Inside the graphics card, these pixel calculations run in parallel. The processing power of graphics cards can also be used for other tasks running in parallel. The technology is known as OpenCL and is often used in image manipulation. In addition, just as WebGL is the web browser-based version of OpenGL, WebCL is the web browser-based version of OpenCL. WebCL is an ideal technology for processing images in order to transform texture maps to have dimensions in powers of two. Moreover, since it runs on the graphics card, WebCL won't demand resources from the CPU. WebCL is new but is likely to play a role in future WebGL development.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.